Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of Changes
: Store "accessor"s names in ModuleDef (for tables, columns, and indexes for now) and pass them to TableSchema as aliases.
Create accessor system tables for each of them:
st_table_accessor,st_column_accessor,st_index_accessorUpdate the SQL parsing logic to also consider alias names.
Alias name stored will be same as actual names until we merge #4263
API and ABI breaking changes
NA
Expected complexity level and risk
3
This patch updates SQL name resolution which isn't a very complex change since table and column name resolution are each handled by their own helper method.
It also adds new system tables which need to be handle correctly during restore/replay. We do have regression tests for this that should catch any incorrect handling or missing steps.
I would say the main risk is that we don't populate cached table and column schemas with the alias/accessor name. Regression tests have been added to catch this, but there are edge cases around migrations and replay that currently aren't covered.
Testing
Added SQL smoketests that use canonical/accessor table/column names. They currently fail because we're currently using the accessor name for both. They should pass once this is updated.